package Service.impl;

import Dao.BookDao;
import Dao.impl.BookDaoImpl;
import Service.BookService;
import fake.domain.Book.Book;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * @ClassName:BookServiceImpl
 * @Author: 鹿建文
 * @Date: 2022/3/24  - 14:19
 * @Describe:
 */
public class BookServiceImpl implements BookService {
    BookDao bookDao = new BookDaoImpl();

    @Override
    public Book getBookByISBN(String isbn) {
        Book book = bookDao.GetBookByISBN(isbn);
        return book;
    }

    @Override
    public Book getBookBybname(String bname) {
        Book book = bookDao.GetBookBybname(bname);
        return book;
    }

    @Override
    public Book getBookByauthor(String author) {
        Book book = bookDao.GetBookByauthor(author);
        return book;
    }

//    @Override
//    public <date> Book getBookBydate(date) {
//        Book book= bookDao.GetBookByISBN(date);
//        return book;
//    }

    @Override
    public Book getBookBypress(String press) {
        Book book = bookDao.GetBookBypress(press);
        return book;
    }

    @Override
    public List<Book> getBookBysal(BigDecimal min, BigDecimal max) {
        return null;
    }

    @Override
    public boolean updatebook(Book book) {
        boolean res = bookDao.Updatebook(book);
        return res;
    }

    @Override
    public boolean addbook(Book book) {
        boolean resadd = bookDao.Addebook(book);
        return resadd;
    }


}
